package com.shopmall.controller;

import com.shopmall.pojo.AdminRecord;
import com.shopmall.service.AdminRecordServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class AdminRecordController {

    @Autowired
    private AdminRecordServiceImpl adminRecordService;

    @RequestMapping("/record/admin_record")
    public String admin_record(Model model){
        List<AdminRecord> records = adminRecordService.queryRecord();
        model.addAttribute("records",records);
        return "/record/admin_record";
    }
}
